<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            display: flex;
            flex-direction: column;
            /* 更换主轴方向 column为垂直方向,侧轴自动变换 */

            justify-content: center;
            /* 主轴居中 */

            align-items: center;
            /* 侧轴居中 */

            width: 150px;
            height: 120px;
            background-color: purple;

            img {
                width: 32px;
                height: 32px;
            }
    </style>
</head>

<body>
    <div class="box">
        <img src="../基础班课程资料/code/day06/案例/images/1.png" alt="">
        <span>媒体</span>
    </div>

</body>

</html>